package com.wolfpire.workflow.om;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 流程委托
 * @author lihd
 *
 */

@Entity
@Table(name = "wf_consign")
public class Consign implements Serializable {
	
	private static final long serialVersionUID = -6893218682078548063L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "consign_id", unique = true, nullable = false, length = 16)
	private Long consignId;//委托ID
	
	@Column(name = "wf_type_id")
	private Long wfTypeId; //流程类型ID
	
	@Column(name = "workflow_id")
	private Long workflowId; //流程定义ID
	
	@Column(name = "flow_name")
	private String flowName; //流程名称
	
	@Column(name = "user_id")
	private Long userId; //原办理用户ID
	
	@Column(name = "user_name")
	private String userName;//原办理用户名
	
	@Column(name = "consign_user_id")
	private Long consignUserId;//委托接收人ID
	
	@Column(name = "consign_user")
	private String consignUser;//委托接收人名称
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "start_date")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")  
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
	private Date startDate;//委托开始时间
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "end_date")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")  
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
	private Date endDate;//委托结束时间
	
	@Column(name = "status")
	private String status;//委托状态(0有效 ,1永久生效, 2失效)
	
	@Column(name = "receive_status")
	private String receiveStatus;//接收状态(0未接收， 1已接收)
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "receive_date")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")  
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
	private Date receiveDate;//接收时间
	
	@Column(name = "remarks")
	private String remarks;

	public Consign() {
		super();
	}

	public Consign(Long consignId, Long wfTypeId, Long workflowId,
			String flowName, Long userId, String userName, Long consignUserId,
			String consignUser, Date startDate, Date endDate, String status,
			String receiveStatus, Date receiveDate, String remarks) {
		super();
		this.consignId = consignId;
		this.wfTypeId = wfTypeId;
		this.workflowId = workflowId;
		this.flowName = flowName;
		this.userId = userId;
		this.userName = userName;
		this.consignUserId = consignUserId;
		this.consignUser = consignUser;
		this.startDate = startDate;
		this.endDate = endDate;
		this.status = status;
		this.receiveStatus = receiveStatus;
		this.receiveDate = receiveDate;
		this.remarks = remarks;
	}

	public Long getConsignId() {
		return consignId;
	}

	public void setConsignId(Long consignId) {
		this.consignId = consignId;
	}

	public Long getWfTypeId() {
		return wfTypeId;
	}

	public void setWfTypeId(Long wfTypeId) {
		this.wfTypeId = wfTypeId;
	}

	public Long getWorkflowId() {
		return workflowId;
	}

	public void setWorkflowId(Long workflowId) {
		this.workflowId = workflowId;
	}

	public String getFlowName() {
		return flowName;
	}

	public void setFlowName(String flowName) {
		this.flowName = flowName;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Long getConsignUserId() {
		return consignUserId;
	}

	public void setConsignUserId(Long consignUserId) {
		this.consignUserId = consignUserId;
	}

	public String getConsignUser() {
		return consignUser;
	}

	public void setConsignUser(String consignUser) {
		this.consignUser = consignUser;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getReceiveStatus() {
		return receiveStatus;
	}

	public void setReceiveStatus(String receiveStatus) {
		this.receiveStatus = receiveStatus;
	}

	public Date getReceiveDate() {
		return receiveDate;
	}

	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}


}
